import React, {} from 'react'
import Loadable from 'react-loadable'

const Home = Loadable({
    loader: () => import('../../views/system/menuManage/homePage'),
    loading: () => <div></div>
});
const System = Loadable({
    loader: () => import('../../views/system/powerManage'),
    loading: () => <div></div>
});
const userTable = Loadable({
    loader: () => import('../../views/system/userManage/index'),
    loading: () => <div></div>
});
const myCenter = Loadable({
    loader: () => import('../../views/myCenter/setInfo'),
    loading: () => <div></div>
});
const routers = [
    // 菜单
    {
        path: "/systemManage",
        name: '系统管理',
        children: [
            {
                path: "/systemManage/index",
                name: '菜单管理',
                component: Home,
            },
            {
                path: "/systemManage/powerManage",
                name: '权限管理',
                component: System,
            },
            {
                path: "/systemManage/userManage",
                name: '用户管理',
                component: userTable,
            },
        ]
    },
    // 个人中心
    {
        path: "/myCenter",
        name: '个人中心',
        children: [{
            path: '/myCenter/setInfo',
            name: '资料设置',
            component: myCenter,
        }]
    }
]

export default routers
